package com.woniuxy.tfss.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.tfss.entity.Order;
import com.woniuxy.tfss.entity.User;
import com.woniuxy.tfss.mapper.OrderMapper;
import com.woniuxy.tfss.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

import org.springframework.stereotype.Service;

@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List<Order> getByUserId(Integer userId) {
        List<Order> orders = orderMapper.getByUserId(userId);
        return orders;
    }

    @Override
    public List<Order> getByRiderId(Integer riderId, String status) {
        List<Order> orders = orderMapper.getByRiderId(riderId,status);
        return orders;
    }

    @Override
    public List<Order> getTodayOrder(Integer userId) {
        List<Order> orders = orderMapper.getTodayOrder(userId);
        return orders;
    }

    @Override
    public List<Order> getByStatus(Integer userId, String status) {
        List<Order> orders = orderMapper.getByStatus(userId, status);
        return orders;
    }

    @Override
    public List<Order> getRiderTodayOrder(Integer riderId) {
        List<Order> orders = orderMapper.getRiderTodayOrder(riderId);
        return orders;
    }

    @Override
    public Order getByNo(String no) {
        return orderMapper.getByNo(no);
    }

    @Override
    public List<Order> getWaitConfirmOrder() {
        return orderMapper.getWaitConfirmOrder();
    }

    @Override
    public List<Order> getWaitRiderOrder() {
        return orderMapper.getWaitRiderOrder();
    }

    @Override
    public List<Order> getRidingOrder() {
        return orderMapper.getRidingOrder();
    }

    @Override
    public List<Order> getCanRobOrder() {
        return orderMapper.getCanRobOrder();
    }


}
